/**
 * 
 */
package br.srv.full.geoProcessing.entities.localidades;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import br.srv.full.geoProcessing.entities.GPSPoint;
import br.srv.full.geoProcessing.entities.Limit;

/**
 * @author Carlos Delfino
 * 
 */
@Entity
@Table(name = "Region")
public class Region implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1669788593097215378L;

	@SuppressWarnings("unused")
	@Id
	private Integer id;

	@Id
	@Column(length = 2)
	private String acronym;

	@Column(length = 50)
	private String name;

	@Column(length = 300)
	private String description;

	@Embedded
	private GPSPoint gPSPoint;

	@OneToMany
	private List<Limit> limits;
 
	@ManyToOne
	private Region region;

	@OneToMany
	private List<Region> subRegions;

	@OneToMany
	private List<Locale> locales;

	/**
	 * @return the acronym
	 */
	public String getAcronym() {
		return acronym;
	}

	/**
	 * @param p_acronym
	 *            the acronym to set
	 */
	public void setAcronym(String p_acronym) {
		acronym = p_acronym;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param p_name
	 *            the name to set
	 */
	public void setName(String p_name) {
		name = p_name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param p_description
	 *            the description to set
	 */
	public void setDescription(String p_description) {
		description = p_description;
	}

	/**
	 * @return the gps
	 */
	public GPSPoint getGps() {
		return gPSPoint;
	}

	/**
	 * @param p_gPSPoint
	 *            the gps to set
	 */
	public void setGps(GPSPoint p_gPSPoint) {
		gPSPoint = p_gPSPoint;
	}

	/**
	 * @return the limits
	 */
	public List<Limit> getLimits() {
		return limits;
	}

	/**
	 * @param p_limits
	 *            the limits to set
	 */
	public void setLimits(List<Limit> p_limits) {
		limits = p_limits;
	}

	/**
	 * @return the regions
	 */
	public Region getRegion() {
		return region;
	}

	/**
	 * @param p_regions
	 *            the regions to set
	 */
	public void setRegion(Region p_regions) {
		region = p_regions;
	}

	/**
	 * @return the subRegions
	 */
	public List<Region> getSubRegions() {
		return subRegions;
	}

	/**
	 * @param p_subRegions
	 *            the subRegions to set
	 */
	public void setSubRegions(List<Region> p_subRegions) {
		subRegions = p_subRegions;
	}

	/**
	 * @return the locales
	 */
	public List<Locale> getLocales() {
		return locales;
	}

	/**
	 * @param p_locales
	 *            the locales to set
	 */
	public void setLocales(List<Locale> p_locales) {
		locales = p_locales;
	}

}
